package com.cqie.rbac.controller;


import com.cqie.rbac.service.IEvaluationViewService;
import com.cqie.rbac.util.Result;
import com.cqie.rbac.vo.EvaluationTaskVo;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * VIEW 前端控制器
 * </p>
 *
 * @author 单机吧
 * @since 2021-10-13
 */
@Api(tags = "评教管理")
@RestController
@RequestMapping("/evaluation")
public class EvaluationViewController {

    @Autowired
    private IEvaluationViewService iEvaluationViewService;

    @ApiOperation("根据字典获取评教指标")
    @GetMapping("/getEvaluationTaskByDict")
    public Result<PageInfo<EvaluationTaskVo>> getEvaluationTaskByDict(Long dictId){
        List<EvaluationTaskVo> evaluationTaskVos = iEvaluationViewService.getEvaluationTaskByDict(dictId);
        return Result.ok().data(evaluationTaskVos);
    }
}
